Skip to content

Conversation

gregdan3
Copy link

@gregdan3 gregdan3 commented Jun 1, 2025

This recipe sets up blink.cmp's bindings such that will navigate down a list of completions, and will navigate up that list. Enter will submit the selected completion and drop the user into the completion's parameter(s) or directly after the inserted text, whichever applies to that completion.

For reference, I had to dig for close to an hour to figure out how to do this.

The following reddit thread is a collection of similar frustrations, as well as multiple outdated ways to achieve this:
https://www.reddit.com/r/neovim/comments/1hfotru/nvimcmp_super_tab_in_blink/

An incomplete solution is here:
LazyVim/LazyVim#250 (reply in thread)

But the preset must be set to "enter", as noted here: Saghen/blink.cmp#576 (reply in thread)

I plainly cannot find where this is documented within blink.cmp's docs.


Edit: Saw the other PR #148 after making this.
However, the linked Blink docs and apparently Blink's super-tab preset don't provide a complete implementation of Supertab as far as I'm aware- you can use tab to navigate, but enter is not the insert binding.
For comparison, the nvim-cmp recipe in the docs gives you both tab navigation and completion insert with enter, so the recipe provided in this PR will have matching behavior, but the other PR will not.

This recipe sets up blink.cmp's bindings such that <Tab> will navigate
down a list of completions, and <S-Tab> will navigate up that list.
Enter will submit the selected completion and drop the user into the
completion's parameter(s) or directly after the inserted text, whichever
applies to that completion.

For reference, I had to dig for close to an hour to figure out how to do
this.

The following reddit thread is a collection of similar frustrations, as
well as multiple outdated ways to achieve this:
https://www.reddit.com/r/neovim/comments/1hfotru/nvimcmp_super_tab_in_blink/

An incomplete solution is here:
LazyVim/LazyVim#250 (reply in thread)

But the preset must be set to "enter", as noted here:
Saghen/blink.cmp#576 (reply in thread)

I plainly cannot find where this is documented within blink.cmp's docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant